<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.EditUserTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.EditUserLabel_userId}" for="userId" />
                    <h:inputText id="userId" value="#{userController.selected.userId}" title="#{bundle.EditUserTitle_userId}" />
                    <h:outputLabel value="#{bundle.EditUserLabel_username}" for="username" />
                    <h:inputText id="username" value="#{userController.selected.username}" title="#{bundle.EditUserTitle_username}" />
                    <h:outputLabel value="#{bundle.EditUserLabel_password}" for="password" />
                    <h:inputText id="password" value="#{userController.selected.password}" title="#{bundle.EditUserTitle_password}" />
                    <h:outputLabel value="#{bundle.EditUserLabel_email}" for="email" />
                    <h:inputText id="email" value="#{userController.selected.email}" title="#{bundle.EditUserTitle_email}" />
                    <h:outputLabel value="#{bundle.EditUserLabel_role}" for="role" />
                    <h:inputText id="role" value="#{userController.selected.role}" title="#{bundle.EditUserTitle_role}" />
                    <h:outputLabel value="#{bundle.EditUserLabel_registrationTime}" for="registrationTime" />
                    <h:inputText id="registrationTime" value="#{userController.selected.registrationTime}" title="#{bundle.EditUserTitle_registrationTime}" />
                    <h:outputLabel value="#{bundle.EditUserLabel_activationTime}" for="activationTime" />
                    <h:inputText id="activationTime" value="#{userController.selected.activationTime}" title="#{bundle.EditUserTitle_activationTime}" />
                    <h:outputLabel value="#{bundle.EditUserLabel_lastLoginTime}" for="lastLoginTime" />
                    <h:inputText id="lastLoginTime" value="#{userController.selected.lastLoginTime}" title="#{bundle.EditUserTitle_lastLoginTime}" />
                    <h:outputLabel value="#{bundle.EditUserLabel_enable}" for="enable" />
                    <h:inputText id="enable" value="#{userController.selected.enable}" title="#{bundle.EditUserTitle_enable}" />
                </h:panelGrid>
                <h:commandLink action="#{userController.update}" value="#{bundle.EditUserSaveLink}"/>
                <br />
                <br />
                <h:link outcome="View" value="#{bundle.EditUserViewLink}"/>
                <br />
                <h:commandLink action="#{userController.prepareList}" value="#{bundle.EditUserShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{bundle.EditUserIndexLink}" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
